<?php
/**
 * Created by PhpStorm.
 * User: stupboy
 * Date: 2018/5/31
 * Time: 16:07
 * Mail:87658989@qq.com
 */

namespace app\mobile\validate;

use think\Validate;

class Base extends Validate
{
    public $ruleData;

    public function getRuleDate($rules,$data){
        $newData = [];
        foreach ($rules as $key=>$rule){
            $field = strpos($key,'|') ? substr($key,0,strpos($key,'|')) : $key;
            $newData[$field] = $data[$field];
        }
        return $newData;
    }
}